package internet;

import java.io.*;
import java.net.Socket;


public class ClientDemo2 {
    public static void main(String[] args) throws IOException {

        Socket s = new Socket("192.168.0.102", 10001);

        OutputStream os = s.getOutputStream();
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        //封装输出流对象
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(os));
        String data = br.readLine();
        while (!data.equals("886")) {
            bw.write(data);
            bw.newLine();
            bw.flush();
            data = br.readLine();
        }
        br.close();

        s.close();
    }
}
